from common.models import TbKg, TbKnowledgepoints


def update():
    kps = TbKnowledgepoints.objects.all()
    for kp in kps:
        kgs = TbKg.objects.filter(chapter=kp.point_name)
        kgs.update(chapter_id=kp.uid)
